using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskStaff
{
readonly static Action<TaskStaff,object>[] _SetValues=new Action<TaskStaff,object>[]{(r,t)=>r.Caption=Reflection.ParseObject(t, r.Caption),(r,t)=>r.DesignKey=Reflection.ParseObject(t, r.DesignKey),(r,t)=>r.TaskId=Reflection.ParseObject(t, r.TaskId),(r,t)=>r.Type=Reflection.ParseObject(t, r.Type),(r,t)=>r.Value=Reflection.ParseObject(t, r.Value)};
readonly static string[] _Columns=new string[]{"Caption","DesignKey","TaskId","Type","Value"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Caption", this.Caption);
AppendValue(action,"DesignKey", this.DesignKey);
AppendValue(action,"TaskId", this.TaskId);
AppendValue(action,"Type", this.Type);
AppendValue(action,"Value", this.Value);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[5];
cols[0]= RecordColumn.Column("Caption",this.Caption);
cols[1]= RecordColumn.Column("DesignKey",this.DesignKey);
cols[2]= RecordColumn.Column("TaskId",this.TaskId);
cols[3]= RecordColumn.Column("Type",this.Type);
cols[4]= RecordColumn.Column("Value",this.Value);
return cols;
}

}
}

